getTextWidth

Calculate an estimated text width for given text properties and text.

getTextWidth(textProperties: IFontStyle, text: string): number

Arguments

textProperties: IFontStyle

  • The text properties for which to calculate the width.

text: string

  • The text for which to calculate the width.

Returns

number

  • Estimated width of the given text.